#pragma once
#include <addons\ScreenQuad.h>

class FallingBlocks : public ds::ScreenQuad {

struct Block {
	ds::Vec2 pos;
	ds::Vec2 velocity;
	ds::Vec2 size;
	float timer;
	float amplitude;
	float frequency;
};

typedef List<Block> Blocks;

public:
	FallingBlocks() : ds::ScreenQuad("FallingBlocks","TexturesMaterial",1024,true) , m_Timer(0.0f) {}
	virtual ~FallingBlocks() {}
	void loadContent(ds::ResManager& resourceManager) {}
	void update(float elapsed);	
private:
	void emitBlocks(float elapsed);
	float m_Timer;
	Blocks m_Blocks;
};

